package ar.utn.jess.domain;

import ar.utn.jess.annotation.Entity;
import ar.utn.jess.annotation.Field;
import ar.utn.jess.common.AbstractEntity;
import ar.utn.jess.common.SelectorData;

@Entity(tableName="barrio_chofer")
public class BarrioChofer extends AbstractEntity{

	private Integer idchofer;
	private Integer idbarrio;
	
	public BarrioChofer() {
		
	}
	
	public BarrioChofer(Integer chofer, Integer barrio) {
		this.idchofer = chofer;
		this.idbarrio = barrio;
	}
	
	
	//-------------------------------------------------------//


	@Override
	protected String getSqlForSelector(SelectorData selectorData) {
		String query = "select id, nombre from barrio ";
		
		return query;
	}


	@Override
	protected String getSqlForAutocompleteOptions(String term) {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	protected String getSqlForOption(String where) {
		String query = "select id, nombre from barrio " + where;
		
		return query;
	}

	//--------------------------------------------------------------//

	@Override
	public void setId(Integer id) {
		super.setId(id);
	}
	
	@Override
	public Integer getId() {
		
		return null;
	}


	@Field(columnName="idchofer")
	public Integer getIdchofer() {
		return idchofer;
	}

	public void setIdchofer(Integer idchofer) {
		this.idchofer = idchofer;
	}

	@Field(columnName="idbarrio")
	public Integer getIdbarrio() {
		return idbarrio;
	}

	public void setIdbarrio(Integer idbarrio) {
		this.idbarrio = idbarrio;
	}
}
